package org.lex.io.filesystem;

import java.io.File;

import javax.swing.Icon;
import javax.swing.filechooser.FileSystemView;
import javax.swing.filechooser.FileView;

// return local file system file-view
public class LocalFileView extends FileView {
	private FileSystemView fs = FileSystemView.getFileSystemView();

	public LocalFileView() {
		super();
	}

	public String getDescription(File f) {
		return fs.getSystemTypeDescription(f);
	}

	@Override
	public Icon getIcon(File f) {
		return fs.getSystemIcon(f);
	}

	@Override
	public String getName(File f) {
		return fs.getSystemDisplayName(f);
	}

	@Override
	public String getTypeDescription(File f) {
		return fs.getSystemTypeDescription(f);
	}

	@Override
	public Boolean isTraversable(File f) {
		return Boolean.TRUE;
	}
}
